﻿
Imports System.IO

Namespace storageJobConsumerInternal2
    Partial Public MustInherit Class diskslice(Of ATOM_T As toBytes)
        Public Interface iindex
            Function datafullpath() As String
            Function indexfile() As String
            Function indexfilefullpath() As String

            Function open(ByVal datafullpath As String, ByVal indexfile As String) As Boolean
            Function close() As Boolean

            Sub clear()
            Function insert(ByVal key As String, ByVal atom As ATOM_T) As Boolean
            Function [erase](ByVal key As String) As Boolean
            Function find(ByVal key As String, ByRef atom As ATOM_T) As Boolean
            Function traversal_index(ByVal action As _do(Of String, ATOM_T, Boolean, Boolean)) As Boolean
        End Interface

        Public Interface imemindex
            Sub clear()
            Function insert(ByVal key As String, ByVal atom As ATOM_T) As Boolean
            Function [erase](ByVal key As String) As Boolean
            Function find(ByVal key As String, ByRef atom As ATOM_T) As Boolean
            Function traversal_index(ByVal action As _do(Of String, ATOM_T, Boolean, Boolean)) As Boolean
        End Interface

        Public Interface ideskindex
            Function datafullpath() As String
            Function indexfile() As String
            Function indexfilefullpath() As String

            Function open(ByVal datafullpath As String, ByVal indexfile As String) As Boolean
            Function close() As Boolean

            Function insert(ByVal key As String, ByVal atom As ATOM_T) As Boolean
            Function [erase](ByVal key As String) As Boolean
        End Interface
    End Class
End Namespace
